package com.gitee.zycra.union.api.common.vo;

import com.gitee.zycra.jdbc.annotation.Table;
import com.gitee.zycra.union.api.common.model.ApiMockTemplate;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * @author zycra
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@Table
public class MockTemplateVO {

    /**
     * mock模板ID
     */
    private Long id;

    /**
     * 模板名称
     */
    private String templateName;

    public static MockTemplateVO buildInterfaceCaseVO(ApiMockTemplate apiMockTemplate) {
        if (apiMockTemplate == null) {
            return null;
        }
        return new MockTemplateVO()
                .setId(apiMockTemplate.getId())
                .setTemplateName(apiMockTemplate.getTemplateName());
    }
}
